
let initialState = true

//reducer只能对状态计算同步处理,不允许使用异步

const statusReducer = (state = initialState, action) => {
    let { type } = action;
    switch (type) {
        case 'CHANGE_STATUS':
            return !state
        default:
            return state
    }
}

export default statusReducer